import { reqMyorderList } from "@/api"
const state = {
    myorderList:{}
}
const actions = {
    async getOrderList({commit},{ page, limit}) {
        let res = await reqMyorderList(page, limit)
        if (res.code == 200) {
            commit('MYORDERLIST', res.data)
        } else return Promise.reject(new Error('faile'))
    }
}
const mutations = {
    MYORDERLIST(state,data){
        state.myorderList = data
    }
}
const getters = {}

export default {
    actions, state, mutations, getters
}